A semiconductor device incorporating a self-diagnosis circuit is used as, for example, an on-vehicle semiconductor device. On a vehicle, a plurality of micro control units (hereinafter, also referred to as an MCU) are mounted in order to carry out various control. In this case, the MCU is constituted by, for example, a single semiconductor device. From a viewpoint of safety, an MCU for mounting on a vehicle (hereinafter, referred to as an on-vehicle MCU) incorporates a self-diagnosis circuit.
The on-vehicle MCU has many logic circuits in order to achieve functions thereof. Meanwhile, as a technique for self-diagnosing the logic circuits, for example, logic built in self test (LBIST) is known. LBIST is described, for example, in Patent Documents 1 to 6.